using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Home.ServerControls;

public partial class _Default : System.Web.UI.Page
{
    private bool _showTreeLine = true;
    private bool _showCheckBox = true;

    protected void Page_Load(object sender, EventArgs e)
    {
        _showCheckBox = this.ckbShowCheckBox.Checked;
        _showTreeLine = this.ckbShowTreeLine.Checked;

        TreeListNode head = new TreeListNode();
        head.RowInfo = new TreeListColumn("a");
        head.ShowCheckBox = _showCheckBox;
        head.OnCheckedFunName = "CheckAll";
        TreeListColumn td1 = new TreeListColumn("head column 1");
        td1.CssClass = "table_3rdheader";
        td1.Align = "left";
        TreeListColumn td2 = new TreeListColumn("head column 2");
        td2.CssClass = "table_3rdheader";
        td2.Align = "center";
        td2.Width = "200px";
        TreeListColumn td3 = new TreeListColumn("head column 3");
        td3.CssClass = "table_3rdheader";
        td3.Align = "center";
        td3.OnClientClick = "onHeadTdClick";
        td3.Width = "200px";


        head.Columns.Add(td1);
        head.Columns.Add(td2);
        head.Columns.Add(td3);


        TreeListNode row1 = new TreeListNode();
        row1.ShowCheckBox = _showCheckBox;
        row1.IconUrl = "images/tree_Specfication_close.gif";
        row1.RowInfo.ID = "1";
        row1.RowInfo.CssClass = "table_oddrow";
        row1.OnCheckedFunName = "onCheckNode";
        row1.RowInfo.Attributes.Add("onmouseover", "onMouseOver(this);");
        row1.RowInfo.Attributes.Add("onmouseout", "onMouseOut(this);");
        row1.RowInfo.Attributes.Add("style", "text-decoration: line-through;");

        TreeListColumn td11 = new TreeListColumn("1 column 1");
        td11.CssClass = "table_oddrow_td";
        td11.Height = "25px";
        TreeListColumn td12 = new TreeListColumn("1 column 2");
        td12.CssClass = "table_oddrow_td";
        TreeListColumn td13 = new TreeListColumn("1 column 3");
        td13.CssClass = "table_oddrow_td";

        row1.Columns.Add(td11);
        row1.Columns.Add(td12);
        row1.Columns.Add(td13);

        TreeListNode row2 = new TreeListNode();
        row2.RowInfo.ID = "12";
        row2.ShowCheckBox = _showCheckBox;
        row2.IconUrl = "images/tree_Specfication_close.gif";
        row2.RowInfo.CssClass = "table_evenrow";
        row2.OnCheckedFunName = "onCheckNode";
        row2.RowInfo.Attributes.Add("onmouseover", "onMouseOver(this);");
        row2.RowInfo.Attributes.Add("onmouseout", "onMouseOut(this);");

        TreeListColumn td21 = new TreeListColumn("2 column 1");
        td21.CssClass = "table_evenrow_td";
        td21.Height = "30px";
        TreeListColumn td22 = new TreeListColumn("2 column 2");
        td22.CssClass = "table_evenrow_td";
        TreeListColumn td23 = new TreeListColumn("2 column 3");
        td23.CssClass = "table_evenrow_td";

        row2.Columns.Add(td21);
        row2.Columns.Add(td22);
        row2.Columns.Add(td23);


        TreeListNode row3 = new TreeListNode();
        row3.RowInfo.ID = "13";
        row3.ShowCheckBox = _showCheckBox;
        row3.IconUrl = "images/tree_Specfication_close.gif";
        row3.RowInfo.CssClass = "table_evenrow";
        row3.OnCheckedFunName = "onCheckNode";
        row3.RowInfo.Attributes.Add("onmouseover", "onMouseOver(this);");
        row3.RowInfo.Attributes.Add("onmouseout", "onMouseOut(this);");

        TreeListColumn td31 = new TreeListColumn("3 column 1");
        td31.CssClass = "table_evenrow_td";
        td31.Height = "40px";
        TreeListColumn td32 = new TreeListColumn("3 column 2");
        td32.CssClass = "table_evenrow_td";
        TreeListColumn td33 = new TreeListColumn("3 column 3");
        td33.CssClass = "table_evenrow_td";
        row3.Columns.Add(td31);
        row3.Columns.Add(td32);
        row3.Columns.Add(td33);

        TreeListNode row22 = new TreeListNode();
        row22.RowInfo.ID = "122";
        row22.ShowCheckBox = _showCheckBox;
        row22.IconUrl = "images/tree_Specfication_close.gif";
        row22.RowInfo.CssClass = "table_oddrow";
        row22.OnCheckedFunName = "onCheckNode";
        row22.RowInfo.Attributes.Add("onmouseover", "onMouseOver(this);");
        row22.RowInfo.Attributes.Add("onmouseout", "onMouseOut(this);");

        TreeListColumn td221 = new TreeListColumn("22 column 1");
        td221.CssClass = "table_oddrow_td";
        td221.Height = "50px";
        TreeListColumn td222 = new TreeListColumn("22 column 2");
        td222.CssClass = "table_oddrow_td";
        TreeListColumn td223 = new TreeListColumn("22 column 3");
        td223.CssClass = "table_oddrow_td";
        row22.Columns.Add(td221);
        row22.Columns.Add(td222);
        row22.Columns.Add(td223);


        TreeListNode row24 = new TreeListNode();
        row24.RowInfo.ID = "24";
        row24.ShowCheckBox = _showCheckBox;
        row24.IconUrl = "images/tree_Specfication_close.gif";
        row24.RowInfo.CssClass = "table_evenrow";
        row24.OnCheckedFunName = "onCheckNode";
        row24.RowInfo.Attributes.Add("onmouseover", "onMouseOver(this);");
        row24.RowInfo.Attributes.Add("onmouseout", "onMouseOut(this);");

        TreeListColumn td241 = new TreeListColumn("24 column 1");
        td241.CssClass = "table_evenrow_td";
        td241.Height = "50px";
        TreeListColumn td242 = new TreeListColumn("24 column 2");
        td242.CssClass = "table_evenrow_td";
        TreeListColumn td243 = new TreeListColumn("24 column 3");
        td243.CssClass = "table_evenrow_td";

        row24.Columns.Add(td241);
        row24.Columns.Add(td242);
        row24.Columns.Add(td243);


        TreeListNode row23 = new TreeListNode();
        row23.RowInfo.ID = "23";
        row23.ShowCheckBox = _showCheckBox;
        row23.IconUrl = "images/tree_Specfication_close.gif";
        row23.RowInfo.CssClass = "table_oddrow";
        row23.OnCheckedFunName = "onCheckNode";
        row23.RowInfo.Attributes.Add("onmouseover", "onMouseOver(this);");
        row23.RowInfo.Attributes.Add("onmouseout", "onMouseOut(this);");

        TreeListColumn td231 = new TreeListColumn("23 column 1");
        td231.CssClass = "table_oddrow_td";
        td231.Height = "60px";
        TreeListColumn td232 = new TreeListColumn("23 column 2");
        td232.CssClass = "table_oddrow_td";
        TreeListColumn td233 = new TreeListColumn("23 column 3");
        td233.CssClass = "table_oddrow_td";
        row23.Columns.Add(td231);
        row23.Columns.Add(td232);
        row23.Columns.Add(td233);



        row1.ChildNodes.Add(row2);
        row1.ChildNodes.Add(row3);
        row2.ChildNodes.Add(row22);
        row2.ChildNodes.Add(row24);
        row2.ChildNodes.Add(row23);

        this.tree.Header = head;
        this.tree.Nodes.Add(row1);
        this.tree.CssClass = "table_border_bottom";
        this.tree.Border = "0";
        this.tree.CellPadding = "0";
        this.tree.CellSpacing = "0";
        this.tree.Width = "100%";
        this.tree.ShowTreeLine = _showTreeLine;
    }
}
